PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

Arbitrary Element

The Arbitrary Element reference form specifies an arbitrary object in a container. If the container is a value (such as a list), AppleScript chooses an object at random (that is, it uses a random-number generator to choose the object). If the container is an application object, it is up to the application to choose an object. It can choose a random object or any object at all. This form is rarely used.

SYNTAX
some className

where

className is the class identifier for the desired object.

EXAMPLES

The following examples return a random file from a disk and a random word from a document. Because an arbitrary element is, by its nature, random, this form is rarely useful in processing groups of files, words, or other objects.

tell application "Finder"
    some file of startup disk
end tell


tell application "AppleWorks"
    some word of text body of front document
end tell

© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)